package Java0311;

import java.util.Scanner;

public class Array05 {
    public static void main(String[] args) {
        //5:定义一个double类型的数组，长度是8，求数组中所有数的积
        double[] array = new double[8];
        Scanner scan = new Scanner(System.in);
        double product = 1;
        System.out.println("请输入8个浮点数：");
        for (int i = 0; i < array.length; i++) {
            double number = scan.nextDouble();
            array[i] = number;
            product *= array[i];
        }
        System.out.println("8个数的乘积：" + product);
    }
}
